package com.engineering.elink.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.engineering.elink.domain.CompanyRecord;

public interface CompanyRecordMapper {
    int deleteByPrimaryKey(Integer companyRecordId);

    int insert(CompanyRecord record);

    int insertSelective(CompanyRecord record);

    CompanyRecord selectByPrimaryKey(Integer companyRecordId);

    int updateByPrimaryKeySelective(CompanyRecord record);

    int updateByPrimaryKey(CompanyRecord record);
    
    /**
     * 获取一条来访记录
     * @param fromUserId
     * @param toUserId
     * @return
     */
    CompanyRecord selectByFromAndTo(@Param("fromUserId") String fromUserId, @Param("toUserId") String toUserId);
    
    /**
     * 获取某一企业的来访列表
     * @param fromUserId
     * @return
     */
    List<Map<String,Object>> selectCompanyRecordList (String toUserId);
}